Website deployment
Website Extraction
-
First you have to extract the
reel-boost-web.zipthen you will get two zip files.- reel-boost-admin.zip
- reel-boost-website.zip
- reel-boost-backend.zip
-
Create
reelboost_webfolder with below commandmkdir -p /var/www/reelboost_web -
Upload
reel-boost-website.zipto a location where you want to deploy Project using FileZilla/var/www/reelboost_web(This is the recommended location)
-
Extract
reel-boost-website.zipto/var/www/reelboost_web -
Here you will get all the files of website.
Configure Environment Variables
-
Edit the
.envfile in the root directory of your project. This step is mandatory to ensure the application can connect to your server. -
Update the following lines in the
.envfile with your actual server and database credentials:NEXT_PUBLIC_API_URL={{your_server_ip}}:{{port}}/api
NEXT_PUBLIC_GOOGLE_SIGNIN_ID="Google Sign-In Client ID"
NEXT_PUBLIC_SOCKET_URL={{your_server_ip}}:{{port}}/
NEXT_PUBLIC_GOOGLE_MAP_KEY="Google Map API Key"
NEXT_PUBLIC_GIF_API_KEY="Giphy API Key"
Server Starting
- After editing the .env file, you have to create build of website.
- Every time you change the code you have to create build of website and restart the server.
npm run build
- After that you have start the server on port 3005.
pm2 start "npm run start -- -p {{Port}}}" --name {{Project_Name}}
- If you want to stop the server then use below command.
pm2 stop {{Project_Name}}
- If you want to restart the server then use below command.
pm2 restart {{Project_Name}}
- you have to open your browser and go to
http://{{server_ip}}:{{Port}}to see the website.